package com.pattern.factory.factorymethod2;

/**
 * <p>
 * 只是生成汽车的工厂类
 * </p>
 *
 * @author qingshan
 * @since 2020-07-19 18:16
 */
public class CarFactory {
    /*
    public Car createCar(){
        System.out.println("a car created !!!!");
        return new Car();
    }
    */

    // -----------------------更加严格的写法 返回接口类型--------------------
    public Moveable create(){
        System.out.println("a car created !!!!");
        return new Car();
    }
}
